package com.panlin.printer.bean;

import com.alibaba.fastjson.JSONObject;
import java.util.HashMap;
import java.util.Map;

public class Result {
    public static final int RESULT_OK = 0;
    public static final int RESULT_FAIL = -1;
    public static JSONObject makeResult(String key,Object value){
        return new JSONObject(){{
            put(key,value);
        }};
    }
    public static Map<String,Object> makeMap(int code){
        Map<String,Object> params=new HashMap<>();
        params.put("code",""+code);
        return params;
    }
}
